{% load django_vite %}
<html>
<head runat="server">
	{% vite_hmr_client %}
	{% vite_asset 'src/login.js' %}
	<title>PgManage</title>
	<meta name="viewport" content="width=device-width,initial-scale=1">
	<link rel="shortcut icon" type="image/x-icon" href="{{base_path}}/static/assets/images/favicon.ico" />
</head>
<body class="omnidb--theme-light">

	<div class="omnidb__login" autofill="false">
		<div class="omnidb__login__wrapper">
			<div class="pgmanage__login__logo">
				{% include 'app/animated_assets/animated_logo_pgmanage.svg' %}
				<div class="omnidb__login__version">
					<small>v{{ pgmanage_short_version }}</small>
				</div>
			</div>

			<div class="loginWrap-body">
				<div class="omnidb__login__input-wrapper">
					<label id="user_title">user</label>
					<input id="txt_user" type="text" placeholder="user">
				</div>
				<div class="omnidb__login__input-wrapper">
					<label id="pwd_title">pwd</label>
					<input id="txt_pwd" type="password" placeholder="password">
				</div>
				<button id="btn_sign_in" type="button">Sign in</button>
			</div>
		</div>
	</div>

<div id="div_error" class="isModal">
		<div class="modal_background_dark">
				<div class ="white_box" style="width: 90%; height: 90%; left: 5%; top: 5%; transform: translate(0px, -50%); -webkit-transform: translate(0px, -50%);">
						<a class="bt_close" onclick="hideError()">x</a>
						<div id="div_error_msg" style="height:100%; width:100%; margin-top:20px; text-align: center;"></div>
				</div>
		</div>
</div>

<div id="div_alert" class="isModal">
		<div class="modal_background_dark">
				<div class ="white_box" style="width: 30%; left: 35%; top: 40%;">
						<div id="div_alert_content" style="height:100%; width:100%;"></div>
				</div>
		</div>
</div>

<!-- Modal Generic Message -->
<div class="modal fade" id="modal_message" tabindex="-1" role="dialog" aria-hidden="true">
	<div id="modal_message_dialog" class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
			</div>
			<div id="modal_message_content" class="modal-body" style='white-space: pre-line;'>
			</div>
			<div class="modal-footer">
				<button id="modal_message_yes" type="button" class="btn btn-primary" data-bs-dismiss="modal">Yes</button>
				<button id="modal_message_ok" type="button" class="btn btn-primary" data-bs-dismiss="modal">Ok</button>
				<button id="modal_message_no" type="button" class="btn btn-danger" data-bs-dismiss="modal">No</button>
				<button id="modal_message_cancel" type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
			</div>
		</div>
	</div>
</div>

<div id="div_loading" class="div_loading" style='z-index: 100005;'>
	<div class="div_loading_cover"></div>
	<div class="div_loading_content">
		<div class="spinner-border text-primary" style="width: 4rem; height: 4rem;" role="status">
			<span class="sr-only ">Loading...</span>
		</div>
		<div>
			<button id="bt_cancel_ajax" style='display: none; margin-top: 10px;' class='btn btn-light' onclick="cancelAjax()">Cancel</button>
		</div>
	</div>
</div>

<!-- <div class="div_loading"><button id="bt_cancel_ajax" onclick="cancelAjax()">Cancel</button></div> -->
<script type="text/javascript">
	var app_base_path = '{{ base_path }}';
	var v_csrf_cookie_name = '{{ csrf_cookie_name }}';
</script>
{% vite_asset 'src/login.js' %}
</body>
</html>
{% csrf_token %}
